<?
$tones = HDServices::contentServices()->tonesRightMenu();

$route = 'bai-giang';
$title = 'Bài giảng';
$index = 'lessons';
switch ($type) {
    case 'lesson':
        $route = 'bai-giang';
        $title = 'Bài giảng';
        $index = 'lessons';
        break;
    case 'video':
        $route = 'video';
        $title = 'Video';
        $index = 'videos';
        break;
    case 'lyric';
        $route = 'hop-am';
        $title = 'Hợp âm';
        $index = 'lyrics';
        break;
    default:
        break;
}

?>
<div class="title">
    <label>{{$title}} theo Điệu</label>
</div>
<div class="ct-box">
    <ul class="list-col">
        @foreach($tones[$index] as $tone)
        <li>
            <div class="link">
                <a href="<?= route($route, array('tone' => $tone->id)) ?>" title="{{$tone->title}}"><?= str_limit($tone->title,12,'...') ?></a>
            </div>
            <div class="number"><?= $tone->total ?></div>
        </li>
        @endforeach
    </ul>
</div>